package cn.skynethome.redisx.cacheserver;

import com.talent.aio.common.ChannelContext;
import com.talent.aio.common.ChannelContextFilter;

import cn.skynethome.redisx.common.RedisxPacket;

public class RedisxChannelContextFilter implements ChannelContextFilter<Object, RedisxPacket, Object>
{
    ChannelContext<Object, RedisxPacket, Object> channelContext = null;
    
    public RedisxChannelContextFilter()
    {
        
    }

    public RedisxChannelContextFilter(ChannelContext<Object, RedisxPacket, Object> channelContext)
    {
        this.channelContext = channelContext;
    }
    
    @Override
    public boolean filter(ChannelContext<Object, RedisxPacket, Object> channelContext)
    {
        // TODO Auto-generated method stub
        if(null != channelContext && channelContext.equals(this.channelContext))
        {
            return false;
            
        }else
        {
            return true;
        }
    }

}
